import { request, excelRequest } from "../request";

export function getMerDefaultSplit(params) {
  // 商户分账默认配置列表
  return request({
    url: `/product/v31/api/merTradeSplit/list`,
    method: "POST",
    params: params,
    headers: {
      token: sessionStorage.getItem("token"),
    },
  });
}

export function saveMerSplit(data) {
  // 保存默认分账配置
  return request({
    url: "/product/v31/api/merTradeSplit/save",
    method: "post",
    data,
    headers: {
      token: sessionStorage.getItem("token"),
    },
  });
}

export function updateMerSplit(data) {
  // 修改默认分账配置
  return request({
    url: "/product/v31/api/merTradeSplit/update",
    method: "post",
    data,
    headers: {
      token: sessionStorage.getItem("token"),
    },
  });
}

export function merSplitDetail(id) {
  // 默认分账详情
  return request({
    url: "/product/v31/api/merTradeSplit/info/" + id,
    method: "GET",
    headers: {
      // "Content-Type":'application/json',
      token: sessionStorage.getItem("token"),
    },
  });
}

export function deletMerSplit(id) {
  // 删除默认分账配置
  return request({
    url: "/product/v31/api/merTradeSplit/delete/" + id,
    method: "post",
    headers: {
      token: sessionStorage.getItem("token"),
    },
  });
}